This application is related to co-pending applications titled xe2x80x9cMicrocontroller with Dual Port RAM for LCD Display and Sharing of Slave Portsxe2x80x9d, xe2x80x9cMicrocontroller with LCD Control over Updating of Ram-Stored Data that Determines LCD Pixel Activationxe2x80x9d, xe2x80x9cMicrocontroller with Liquid Crystal Display Charge Pumpxe2x80x9d, and xe2x80x9cMethodology for Testing a Microcontroller Chip Adapted to Control a Liquid Crystal Displayxe2x80x9d, filed on the same day and assigned to the same assignee as this application, and the disclosures of which are incorporated herein by reference.
The present invention relates generally to microprocessors especially adapted to provide control functions for external systems or subsystems, and thus generally referred to as microcontrollers, and more particularly to microcontrollers which are capable of providing liquid crystal display (LCD) driver functions without need for peripheral elements other than the display itself.
An LCD generally comprises a pair of glass plates between which a liquid crystal material is sandwiched, the liquid crystal having the property of undergoing orientation of its crystal-like structure according to an electric field placed between transparent electrically conductive material on the plates, and thereby causing a selective darkening of the respective pixels with the passage of light through the liquid crystal to render the darkened pixels visible to the eye. The typical LCD, such as that shown in FIG. 1, which illustrates a panel 10 of the prior art, employs a plurality of commonly formed, potential alphanumeric characters 12. Each ofthe characters is in the form of a block figure xe2x80x9c8xe2x80x9d shape composed of a plurality of individual lineal pixels 15xe2x80x94typically seven as shown in the Figure, although more may be used where greater curvature or detail of reproduction of the particular alphanumeric character to be displayed is desired. In the seven pixel character, three horizontal pixels such as 17, 18, and 19 are vertically aligned and equally spaced apart, and two vertical aligned pixels 21, 22 (and 23, 24) are positioned at each end of the array of horizontal pixels bounding the respective spaces between the latter.
The pixels are conventionally driven by waveforms applied to a digitally encoded array of electrical conductors of printed circuit form (not shown in FIG. 1), each of the conductors on the top side of the LCD being connected to xe2x80x9csegmentsxe2x80x9d, while the conductors on the bottom are connected to xe2x80x9ccommonsxe2x80x9d. Hence, when a particular digital code (e.g., binary-based) is applied in the form of an electrical energization of the various conductors, a particular alphanumeric character is displayed on the LCDxe2x80x94assuming, of course, the presence of a source of light emanating through the plates. The xe2x80x9csegmentsxe2x80x9d are electrically energized by drivers which are supplied as part of a peripheral device, typically on a semiconductor circuit chip (not shown in FIG. 1). The xe2x80x9ccommonsxe2x80x9d are also driven by the semiconductor circuit chip in such a way that the RMS voltage across each of the pixels will be either above a threshold value (pixel dark) or below that threshold value (pixel clear). For any given LCD, the product of the number of xe2x80x9ccommonsxe2x80x9d multiplied by the number of xe2x80x9csegmentsxe2x80x9d is equal to the number of pixels in the display.
LCDs are used in a wide variety of applications including home security systems, industrial control thermostats, home thermostats, blood pressure meters, blood glucose meters, AC power meters, toys, voice recorders, microwave ovens, and carbon monoxide detectors, to name but a few. The use of LCDs in such applications, and in which one or more microcontrollers is used to control the system constituting the application in which the LCD is used, is, in and of itself, quite conventional. Heretofore, however, the display (which may include a large number of pixels) has been operated and controlled by its own power source and control devices, while the system in which or with which the display is used is separately controlled by the microcontroller. The requirement of separate control devices has adversely affected the cost, complexity, and size of the overall control portion of the system.
The nature of the problem may be better understood by reference to a relatively simple example of a thermostat which is used to control the temperature of the air in an enclosure by means of control exercised on a heating, ventilating, and air conditioning (HVAC) system for the enclosure. A thermistor provides an analog input indicative of the temperature of the air in the enclosure. An LCD display provides a visual indication of that temperature, and also displays a set point or set temperature which is designated by the user by appropriate selection using a keypad. An interrupt is provided by a keypad interface that allows the user to punch in certain keypad information as references which are used by the microcontroller to change the display, such as to write another output into memoryxe2x80x94a select voltage for the thermostat output at which the microcontroller will turn on a heat pump in the system.
It would be desirable to consolidate everything, or at least a substantial part of the control functions, within a single productxe2x80x94namely, the microcontroller chip itself. Such a goal, however, is by no means a simple task. An LCD display operates at a considerably slower speed than a microcontroller. Also, the timing of the microcontroller control functions is different from the timing of the LCD control functions. Another issue arises in connection with the capability of a microcontroller to be placed in a xe2x80x9csleepxe2x80x9d mode or sleep state to conserve power, whereas the LCD display must continue to function.
Present-day systems that control an LCD display which itself is used in conjunction with a system to be controlled by a microcontroller require a source of clock pulses to control the timing and updating of the display, among other things, when not supplied by the microcontroller itself, as when the latter is in its sleep mode. Although the microcontroller device package typically has a pin available for an external input, the device user may not wish to use that capability, preferring to reserve it for other essential purposes. For the LCD to remain operational, the timing module must supply clock signals to the logic section which drives the LCD display. In a typical present-day application, currently available microcontrollers are incapable of providing any clock function when in the sleep state.
If the device user""s application requires that the LCD display must or should remain operational, it becomes necessary for the user to employ a separate device that will make external clock signals available for LCD control, by applying the external clock to an external pin of the microcontroller. This means that the selected pin (only a finite number of which are availablexe2x80x94in a typical device, only one, or perhaps two) will be unusable for another purpose. And the other purpose may be much more essential in an emergency situation.
Two types of waveforms are variously used to drive an LCD display, as will be described in greater detail below. A type A waveform generates xe2x80x9ccommonxe2x80x9d and xe2x80x9csegmentxe2x80x9d waveforms, with all data contained in a single frame and assembled in complementary fashion, such as high voltage and low voltage, to produce a DC value of zero for that frame. It is essential that the voltage waveform across the glass plates of the display be maintained at an average DC value of zero because the glass is likely to suffer a breakdown if a non-zero DC voltage is applied for any sustained period of time. A type B waveform generates xe2x80x9ccommonxe2x80x9d and xe2x80x9csegmentxe2x80x9d waveforms with ,all of the data in two frames, the actual data being assembled in a first frame and that same data being assembled in inverse form in a second frame, such that an average DC value of zero is maintained for the type B waveform over a full two frames of data.
Generally, the type A waveform is employed for simple LCD displays, and the type B waveform is utilized for more complex LCD and higher MUX rate displays, the latter because of a better discrimination ratio for the type B which produces an enhanced viewing angle. To turn an LCD pixel on, the RMS voltage of either waveform must exceed the threshold voltage of the glass (or, more accurately, of the capacitive element constituting the electrically conductive confronting pixels), and to turn the pixel off, the RMS voltage value must be below that threshold voltage. The contrast in the display increases to a limited extent with increases in RMS voltage above the threshold voltage of the glass. A significant problem arises in the manner in which the waveform voltages are developed to drive the LCD efficiently from the microcontroller.
Because the type A waveform supplies data read from a random access memory (RAM) in a single frame of zero DC value, the RAM can be read or written to at any time. In contrast, with the type B waveform, since two frames are required over which to achieve the zero DC value it is necessary to retain the data in the RAM for that entire period, i.e., two frames or cycles of the waveform. A change of data in the RAM before the second frame is completed, for example, could result in the second frame not containing the inverse of the data in the first frame, and a resultant non-zero DC value.
The frame rates for LCD control are very slow, relatively, residing in the 60 to 100 hertz (Hz) range, whereas the microcontroller typically operates at rates of one megahertz (MHz) or higher. With the fast-running microcontroller, it becomes difficult to maintain a DC value of zero in the type B waveform simply because data may be changing so rapidly. So the reliability and physical instability of the LCD glass itself presents a problem in operating an LCD display from a control function consolidated with the microcontroller.
Yet another substantial problem resides in the manner in which a consolidated LCD-functional microcontroller may be tested. The very slow speed LCD display poses serious problems in devising test methodology that will allow the microcontroller to be tested in a manner suited to its operating speed and which is not wasteful of test time or test cost. Moreover, the analog voltages and functions to be accommodated for the LCD conflict with a desire to conduct testing of the microcontroller on a digital tester or using digital simulations.
Another series of problems is encountered when the semiconductor substrate in which the microcontroller is fabricated is P-type rather than N-type. The conductivity of the P-type substrate makes it necessary to operate with positive voltages, including the development of positive voltages to operate and enable the various functions of the LCD display and its control.
It is a principal aim of the present invention to provide a microcontroller device which efficiently and economically consolidates one or more LCD control functions with other, more conventional system control functions of the microcontroller. More particularly, it is an object of the invention to consolidate into one partxe2x80x94one productxe2x80x94an analog interface for receiving and transmitting analog voltage (or other waveform) inputs and outputs, an LCD interface for updating the LCD display, and the microcontroller instructions and sequencer for performing control operations.
A related object is to incorporate at least a portion of the capability to control an LCD of a microcontroller-controlled system within the microcontroller chip itself.
Still another important aim of the present invention is to provide a microcontroller which is adapted to provide an internal clock source to assist in driving an LCD display, for applications such as home security systems, industrial control thermostats, and other usages, at times when the microcontroller is relegated to a sleep state and would not otherwise perform anything beyond simple monitoring functions to determine whether and when it needed to be awakened.
The present invention gives the device user the option to employ or enable an internal clock sourcexe2x80x94that is, within the microcontroller itselfxe2x80x94as a convenient tool that will allow the microcontroller to sleep, and thereby conserve power, and yet allow the LCD display to remain fully operational so that appropriate points of the system can be visually monitored nevertheless. According to the invention, a simple and inexpensive RC oscillator is fabricated on the semiconductor microcontroller chip to clock the LCD module and allow the LCD display to remain functional during periods when the microcontroller is in the sleep state.
A device-implemented method is employed for operating a device that includes the microcontroller fabricated on a semiconductor chip to control an LCD display of the external system intended to be controlled by the microcontroller. The microcontroller is adapted to selectively enter a sleep state in which it operates in a reduced electrical power mode for battery power conservation during periods of time when functional activity of the microcontroller is reduced. The microcontroller is further adapted to be awakened from the sleep state for resumption of activity when such a period ends. In the method, clock signals are supplied to the LCD for timing its operation from the internal RC clock of the microcontroller when the microcontroller is awake. When the microcontroller is detected to enter a sleep state, since the internal RC oscillator is independent of the microcontroller""s internal clock which stops during sleep, it is able to supply clock signals to the LCD for sustained timing of the operation thereof during each period of time that the microcontroller is in a sleep state.
In the preferred embodiment, the independent internal on-chip clock is an RC oscillator. Timing to the LCD is decoupled from the microcontroller""s own internal clock when the RC oscillator is selected by the user. Selection of the RC oscillator may be made out of a possible three clock sources for the LCD.
Therefore, another, more specific aim of the invention is to provide an internal RC clock which is fabricated on-chip with a microcontroller, and which may be selected by the user over the microcontroller""s own internal clock, which will result in timing to the LCD display being decoupled from the microcontroller""s internal clock so that the LCD display may remain functional when the microcontroller is in a sleep state.